﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Codemonk.Updater.Client.Console
{
    class Program
    {
        static void Main(string[] args)
        {
            bool isStarted = false;
            Codemonk.Updater.Client.Common.Updater.Check(e => System.Console.WriteLine(e), m =>
            {
                Codemonk.Updater.Client.Common.Updater.Update(m, e => { }, file => System.Console.WriteLine(file), (b, file) => System.Console.WriteLine(file),
                    () =>
                    {
                        Codemonk.Updater.Client.Common.Updater.Start(m.EntryPoint);
                        isStarted = true;
                    });
            });
            while (!isStarted) System.Threading.Thread.Sleep(0);
        }
    }
}
